package models

import "github.com/astaxie/beego/orm"

type UserInfo struct {
	Id int
	Username string
	Password string
	Status int
	Nick string
	HeadImg string
	Sex int
}

func GetUserInfoForUsername(username string) *UserInfo  {
    user := new(UserInfo)
	db := orm.NewOrm()
	err := db.QueryTable(user).Filter("username",username).One(user)
	if err != nil {
		return nil
	}
	return user
}